mytest = [2,7,11,15]
target = 9

for i in mytest:
    num = target - i
    if num in mytest:
        print([mytest.index(i),mytest.index(num)])
